pub fn convert_base(num_str: &str, to_base: u32) -> String {
    // num_str = 8(10)
    let num = &num_str[0..num_str.find("(").unwrap()];
    let base = &num_str[num_str.find("(").unwrap() + 1..num_str.len() - 1];
    let base_ral = u32::from_str_radix(base, 10).unwrap();
    let num_ral = u32::from_str_radix(num, base_ral).unwrap();
    let mut num_ral = num_ral;
    let mut result = String::new();
    while num_ral > 0 {
        let rem = num_ral % to_base;
        if rem >= 10 {
            let rem = (rem - 10) as u8 + b'a';
            result.push(rem as char);
        } else {
            result.push_str(&rem.to_string());
        }
        num_ral /= to_base;
    }
    result.chars().rev().collect()
}
